python3: reduce bloat by removing *.pyo and *.pyc files
authorAlexandru Ardelean <[email protected]>
Thu, 16 Oct 2014 05:46:32 +0000 (08:46 +0300)
committerAlexandru Ardelean <[email protected]>
Mon, 20 Oct 2014 15:04:12 +0000 (18:04 +0300)
Seems that if you add a package folder this would also
include the compiled python3 files which increases fw size.

Signed-off-by: Alexandru Ardelean <[email protected]>
lang/python3/files/python3-package.mk

index e85b648197e5b31b12082742a842797d5f002bc0..090d8460162970a2725758ba98ec36c397f5ceb8 100644 (file)
@@ -32,6 +32,7 @@ define Py3Package
   $(call shexport,Py3Package/$(1)/filespec)
 
   define Package/$(1)/install
+       find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
        @$(SH_FUNC) getvar $$(call shvar,Py3Package/$(1)/filespec) | ( \
                IFS='|'; \
                while read fop fspec fperm; do \